package com.mall.common;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * @Description 常量集合
 * @ClassName constant
 * @Author cxx
 * @Date 2023/4/23 21:58
 * @Version 1.0
 */
public class Constant {

    //消息延迟时间
    public static Integer DelayTime =  60 * 1000;
    //订单队列交换机名字
    public static final String ORDEREXCHANGE = "order-exchange";

    //订单队列队列名

    public static final String ORDERQUEUE = "order-queue";

    //订单队列路由key
    public static final String ORDERKEY = "order-key";

    //商品数量内存标记
    public static ConcurrentHashMap<String, Boolean> MEMORY_TAGS = new ConcurrentHashMap<>(16);
    //记录商品下单失败次数
    public static AtomicInteger count = new AtomicInteger(0);
    //记录RabbitMQ订单发送次数
    public static AtomicInteger orderCount = new AtomicInteger(0);

}
